package cz.cvut.kadledav.paa.weight3sat.bo;

/**
 * User: David Kadlecek
 * Date: 30.12.13
 */
public class Variable {
    final int index;
    final boolean negation;

    public Variable(boolean negation, int index) {
        this.negation = negation;
        this.index = index;
    }

    public int getIndex() {
        return index;
    }

    public boolean getValue(boolean evaluation){
        if(negation){
            return !evaluation;
        }
        return evaluation;
    }

}
